package com.peng.servlet;

import com.peng.entity.staff;
import com.peng.service.impl.staffServiceImpl;
import com.peng.service.staffService;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * Created by 欧阳欣鹏 on 2018/8/7.
 */
public class SelServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        staffService s=new staffServiceImpl();
        List<staff> li=s.li();
        request.setAttribute("li",li);
        request.getRequestDispatcher("cate-del.jsp").forward(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }
}
